home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / dsp / dr.bub / 96000.lha / 96000 / appb / b141.asm < prev    next >
Assembly Source File  |  1992-04-28  |  2KB  |  39 lines

  1. ; This program was originally published in the Motorola DSP96002 Users Manual
  2. ; and is provided under a DISCLAIMER OF WARRANTY available from Motorola DSP
  3. ; Operation, 6501 William Cannon Drive West, Austin, Texas 78735-8598.  For
  4. ; more information, refer to the DSP96002 Users Manual, Appendix B, DSP
  5. ; Benchmarks.
  6. ;
  7. ; B.1.41    64x64 Bit Unsigned Multiply  
  8. ;This performs a double precision unsigned integer multiply.  The  64 bit integer is formed by the con-
  9. ;catenation of two 32 bit registers.  
  10. ;Let X = A:B and Y = C:D, then X*Y can be written as:  
  11. ;                        A   B 
  12. ;                     *  C   D 
  13. ;           ------------------ 
  14. ;            +           B * D 
  15. ;            +       A * D 
  16. ;            +       B * C 
  17. ;            +   A * C 
  18. ;           ------------------ 
  19. ;            =   W   X   Y   Z 
  20.  
  21. ;            64x64 Bit Unsigned Multiply                     Program    ICycles 
  22. ;            d3:d7:d6:d4 = d0:d1 * d2:d3                     Words 
  23.  
  24.   mpyu  d0,d2,d7                                             ;  1     1 
  25.   mpyu  d0,d3,d5                                             ;  1     1 
  26.   mpyu  d1,d3,d4    d7.h,d3.l                                ;  1     1 
  27.   mpyu  d1,d2,d6    d4.h,d0.l                                ;  1     1 
  28.   move              d6.h,d2.l                                ;  1     1 
  29.   add   d0,d5       d5.h,d1.l                                ;  1     1 
  30.   addc  d1,d2                                                ;  1     1 
  31.   inc   d3          ifcs                                     ;  1     1 
  32.   add   d5,d6                                               ;   1     1 
  33.   addc  d2,d7                                                ;  1     1 
  34.   inc   d3          ifcs                                     ;  1     1 
  35.                                                              ; ---   --- 
  36.                                                ;       Totals:  11    11 
  37.  
  38.